using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Rss;
/*
 			RssFeed rssFeed = RssFeed.Read(@"http://www.hotnews.ro/rss");
			Console.WriteLine(rssFeed.Channels.Count);

 */

namespace LWRSSReader
{


	public partial class Form2 : Form
	{
		private Settings _settings;

		public Form2()
		{
			InitializeComponent();
			
		}

		
		private void Form2_Load(object sender, EventArgs e)
		{
			if (this.Owner is Form1)
			{
				_settings = ((Form1)this.Owner).Settings;
			}
			else if (this.Owner is Form4)
			{
				_settings = ((Form4) this.Owner).Settings;
			}
			if (_settings == null)
			{
				Close();
				return;
			}
			propertyGrid1.SelectedObject = _settings;
			propertyGrid1.ExpandAllGridItems();
		}



		private void closeButton_Click(object sender, EventArgs e)
		{
			this.DialogResult = DialogResult.OK;
			Close();
		}

		private void Form2_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Escape)
			{
				this.DialogResult = DialogResult.OK;
				Close();
			}
		}


	

	}


	


	
	








}